home *** CD-ROM | disk | FTP | other *** search
/ Amiga Tools 4 / Amiga Tools 4.iso / tools / internet-tools / connect-line / cl / rexx / cl-bugreport.clrexx < prev    next >
Encoding:
Text File  |  1996-02-05  |  7.0 KB  |  283 lines

  1. /*
  2. **  $VER: CL-Bugreport.clrexx 0.2 (55 Feb 1996)
  3. **
  4. **        © 1996 Ralf Ramge
  5. **
  6. **  PROGRAMNAME:
  7. **      CL-Bugreport.clrexx
  8. **
  9. **  FUNCTION:
  10. **      Erstellt Bugreport und verschickt diesen.
  11. **
  12. **  $HISTORY:
  13. **
  14. **   25 Jan 1996 : 0.1 : initial release
  15. **   05 Feb 1996 : 0.2 : cl_rexx wird jetzt auch mal
  16. **                       rechtzeitig geöffnet *schluck*
  17. **                       Zwecks Testlauf kann bei der
  18. **                       Angabe des Empfängers des
  19. **                       Bugreports auch 'Niemand' an-
  20. **                       gegeben werden.
  21. **                       Optische Fixes
  22. */
  23.  
  24. /* rexxsupport.library öffnen */
  25.  
  26. if ~show('L','rexxsupport.library') then do
  27.     if ~addlib('rexxsupport.library',0,-30,0) then exit 10
  28.     end
  29.  
  30. /* cl_rexx.library öffnen */
  31.  
  32. if ~show('L','cl_rexx.library') then do
  33.     if ~addlib('cl_rexx.library',0,-30,0) then exit 10
  34.     end
  35.  
  36.  
  37. /* Fontsize ermitteln */
  38.  
  39. gfxbase=showlist(l,'graphics.library',0,a)
  40. call forbid
  41. FontAddress=next(gfxbase,154)
  42. Fontsize=c2d(IMPORT(offset(FontAddress,20),2))
  43. call permit
  44. windowwidth=Fontsize*70
  45. windowheight=Fontsize*15
  46. windowY=Fontsize+1
  47. WindowX=Fontsize
  48.  
  49.  
  50. /* Standard-IO umleiten */
  51.  
  52. screen=CLGET_FrontScreenName()
  53.  
  54. call close STDOUT
  55. if ~open(STDOUT,'CON:'windowX'/'windowY'/'windowwidth'/'windowheight'/CL-Bugreport/SCREEN'screen,'W') then
  56.     exit 20
  57. else do
  58.     call close STDIN
  59.     call open STDIN,'*',R
  60.     call pragma '*'
  61.     end
  62.  
  63. options failat 50
  64. signal off failure
  65.  
  66. say 'Dieses Skript erstellt einen Bugreport zu CL 5.0'
  67. say 'und ergänzt diesen mit Angaben zu dem bei Ihnen in-'
  68. say 'stallierten System, welche die Fehlersuche erleich-'
  69. say 'tern könnten.'
  70. say ''
  71.  
  72.  
  73. if ~open('out','T:Bugreport.txt','W') then do
  74.     say 'Konnte Ausgabedatei nicht öffnen!'
  75.     call ende
  76.     end
  77.  
  78. zeile.1='Connectline Bugreport'
  79. zeile.2='---------------------'
  80. zeile.3=''
  81. zeile.4='Systemname: 'CLGET_OwnSystemAddress()
  82. zeile.5='------------------------------------------------------------'
  83. zeile.6=''
  84. zeile.7='Fehlerbeschreibung:'
  85. zeile.8='-------------------'
  86. zeile.9=''
  87.  
  88. do x=1 to 9
  89.     call writeln 'out',zeile.x
  90.     end
  91. call close 'out'
  92.  
  93. if ~CLONL_Wait() then exit
  94.  
  95. call CL_Edit('T:Bugreport.txt')
  96. call writestatus
  97.  
  98. say 'Ist der Bug reproduzierbar?'
  99. taste=CLONL_ShortMenu('Ja','Nein')
  100. if taste='-1' then exit
  101.  
  102. call openout
  103.  
  104. call writeln 'out',''
  105. if taste='N' then do
  106.     call writeln 'out','Der Bug ist nicht reproduzierbar.'
  107.     call close 'out'
  108.     end
  109. if taste='J' then do
  110.     say ''
  111.     say 'Bitte beschreiben Sie nun die Vorgehensweise.'
  112.     if ~CLONL_Wait() then exit
  113.     zeile.1='Der Bug ist folgendermaßen reproduzierbar:'
  114.     zeile.2='------------------------------------------'
  115.     zeile.3=''
  116.     do x=1 to 3
  117.         call writeln 'out',zeile.x
  118.         end
  119.     call close 'out'
  120.     call CL_Edit('T:Bugreport.txt')
  121.     call close 'status'
  122.     call writestatus
  123.     end
  124.  
  125. say 'Dokumentiere Systemkonfiguration ...'
  126. parse version sysstr
  127. call openout
  128. call writeboth ''
  129. call writeboth 'Angaben zum Rechnertyp:'
  130. call writeboth '-----------------------'
  131. call writeboth 'Prozessor  : 'word(sysstr,3)
  132. call writeboth 'Coprozessor: 'word(sysstr,4)
  133. call writeboth 'Video      : 'word(sysstr,5)
  134. call writeboth 'Clock      : 'word(sysstr,6)
  135. call writeboth ''
  136. address command 'version >t:tmp'
  137. anz=CL_GetText('t:tmp',zeile)
  138. call writeboth 'Kickstart  : 'translate(word(zeile.0,2),' ',',')
  139. call writeboth 'Workbench  : 'word(zeile.0,4)
  140. call writeboth 'ARexx      : 'word(sysstr,1)' 'word(sysstr,2)
  141. call writeboth ''
  142. call writeboth 'Aktuelle Speicherverhältnisse:'
  143. call writeboth '------------------------------'
  144. address command 'avail >t:tmp'
  145. anz=CL_GetText('t:tmp',zeile)-1
  146. do x=1 to anz
  147.     call writeboth zeile.x
  148.     end
  149. say ''
  150. say 'Erstelle Liste der laufenden und wartenden Tasks.'
  151. call writeboth ''
  152. call writeboth 'Liste der Tasks:'
  153. call writeboth '----------------'
  154. tasklist=showlist('W')' 'showlist('T')
  155. call writeboth tasklist
  156. call writeboth ''
  157.  
  158. say ''
  159. say 'Erstelle Liste der geladenen Libraries.'
  160. call writeboth 'Liste der im Speicher befindlichen Libraries:'
  161. call writeboth '---------------------------------------------'
  162. liblist=showlist('L')
  163. do x=1 to words(liblist)
  164.     address command 'version >t:tmp 'word(liblist,x)' full'
  165.     anz=CL_GetText('t:tmp',zeile)
  166.     call writeboth zeile.0
  167.     end
  168. call writeboth ''
  169. say ''
  170. say 'Erstelle Liste der CL-Programmteile und der Libs auf der Platte.'
  171. call writeboth 'Versionen der Connectline-Programmteile auf der Platte:'
  172. call writeboth '-------------------------------------------------------'
  173. dir.1='CONNECTLINE:'
  174. dir.2='CONNECTLINE:C/'
  175. dir.3='CONNECTLINE:Classes/'
  176. dir.4='CONNECTLINE:Commands/'
  177. dir.5='CONNECTLINE:Libs/'
  178. dir.6='CONNECTLINE:Modules/'
  179. dir.7='CONNECTLINE:PrefExe/'
  180. dir.8='CONNECTLINE:Rexx/'
  181. dir.9='CONNECTLINE:Rexx/Modules/'
  182. dir.10='CONNECTLINE:Startup/'
  183. dir.11='CONNECTLINE:Tools/'
  184.  
  185. do x=1 to 11
  186.     call writeboth ' '
  187.     call writeboth 'Durchsuche Directory: 'dir.x
  188.     dirlist=showdir(dir.x,'F')
  189.     if words(dirlist)=0 then call writeboth 'Keine Files enthalten.'
  190.     else do
  191.         do i=1 to words(dirlist)
  192.             if right(word(dirlist,i),5)~='.info' then do
  193.                 address command 'version 'dir.x||word(dirlist,i)' file full >t:tmp'
  194.                 anz=CL_GetText('t:tmp',zeile)
  195.                 call writeboth zeile.0
  196.                 end
  197.             end
  198.         end
  199.     end
  200. say ''
  201. say 'Erstelle Dump der Startup-Sequences.'
  202. anz=CL_GetText('s:startup-sequence',zeile)-1
  203. call writeboth 'Startup-Sequence:'
  204. do x=1 to anz
  205.     call writeboth zeile.x
  206.     end
  207. call writeboth ' '
  208. call writeboth 'User-Startup:'
  209. anz=CL_GetText('s:user-startup',zeile)-1
  210. do x=1 to anz
  211.     call writeboth zeile.x
  212.     end
  213.  
  214. call close 'out'
  215. call close 'status'
  216.  
  217. say 'Bitte geben Sie den Empfänger des Bugreports an:'
  218. taste=CLONL_ShortMenuVertical('1 /CLC/SYSOPS/BUGS','2 Mathias Mischler','3 CL-Team','4 Alle','5 Niemand')
  219. select
  220.     when taste='-1' then exit
  221.     when taste='1' then do
  222.         emp='/CLC/SYSOPS/BUGS'
  223.         call sendmail
  224.         end
  225.     when taste='2' then do
  226.         emp='merlin@sixpack.pfalz.de'
  227.         call sendmail
  228.         end
  229.     when taste='3' then do
  230.         emp='merlin@sixpack.pfalz.de'
  231.         call sendmail
  232.         emp='owagner@lsd.wupper.de'
  233.         call sendmail
  234.         end
  235.     when taste='4' then do
  236.         emp='/CLC/SYSOPS/BUGS'
  237.         call sendmail
  238.         emp='merlin@sixpack.pfalz.de'
  239.         call sendmail
  240.         emp='owagner@lsd.wupper.de'
  241.         call sendmail
  242.         end
  243.     otherwise nop
  244.     emp='root'
  245.     call sendmail
  246.     end
  247.  
  248. /*
  249. address command 'delete >NIL: t:tmp'
  250. address command 'delete >NIL: t:Bugreport.txt'
  251. */
  252.  
  253. exit
  254.  
  255.  
  256. openout:
  257. if ~open('out','T:Bugreport.txt','A') then do
  258.     say 'Konnte Ausgabedatei nicht öffnen!'
  259.     exit 10
  260.     end
  261. return
  262.  
  263. writestatus:
  264. call open('status','CON:'windowX'/'windowY+windowheight+1'/'windowwidth'/'windowheight*4'/CL-Bugreport/SCREEN'screen,'W')
  265. anz=CL_GetText('T:Bugreport.txt',zeile)-1
  266. do x=0 to anz
  267.     call writech 'status',zeile.x'0a'x
  268.     end
  269. return
  270.  
  271. writeboth:
  272. param=arg(1)
  273. call writeln 'out',param
  274. call writech 'status',param'0a'x
  275. return
  276.  
  277. sendmail:
  278. /*
  279. call CL_SendMailFull('CL-Bugreport',emp,'T:Bugreport.txt',,,'Bugreport','TEXT','A')
  280. */
  281. return
  282.  
  283.